home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 20 / Cream of the Crop 20 (Terry Blount) (1996).iso / program / n_b_v203.zip / MOVETBOX.DMO < prev    next >
Text File  |  1996-07-04  |  5KB  |  86 lines

  1. $if 0
  2.     ┌──────────────────────────╖                        PowerBASIC v3.20
  3.  ┌──┤          DASoft          ╟──────────────────────┬──────────────────╖
  4.  │  ├──────────────────────────╢    Copyright 1995    │ DATE: 1995-10-01 ╟─╖
  5.  │  │ FILE NAME   MOVETBOX.DMO ║          by          ╘════════════════─ ║ ║
  6.  │  │                          ║  Don Schullian, Jr.                     ║ ║
  7.  │  ╘══════════════════════════╝                                         ║ ║
  8.  │ A license is hereby granted to the holder to use this source code in  ║ ║
  9.  │ any program, commercial or otherwise,  without receiving the express  ║ ║
  10.  │ permission of the copyright holder and without paying any royalties,  ║ ║
  11.  │ as long as this code is not distributed in any compilable format.     ║ ║
  12.  │  IE: source code files, PowerBASIC Unit files, and printed listings   ║ ║
  13.  ╘═╤═════════════════════════════════════════════════════════════════════╝ ║
  14.    │                ....................................                   ║
  15.    ╘═══════════════════════════════════════════════════════════════════════╝
  16. $endif
  17.  
  18. '.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°
  19. ' ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° °
  20.  
  21. $INCLUDE "DAS-NB01.INC"
  22. $INCLUDE "DAS-NBT1.INC"
  23. COLOR 7, 0
  24. CLS
  25.  
  26. ? "┌─────────────────────────────────────────────────────────────────────────────
  27. ? "│ TBoxUP    ( Row?, Col?, Rows?, Cols?, Char?, Attr% )
  28. ? "│ TBoxDOWN  ( Row?, Col?, Rows?, Cols?, Char?, Attr% )
  29. ? "│ TBoxLEFT  ( Row?, Col?, Rows?, Cols?, Char?, Attr% )
  30. ? "│ TBoxRIGHT ( Row?, Col?, Rows?, Cols?, Char?, Attr% )
  31. ? "├─────────────────────────────────────────────────────────────────────────────
  32. ? "│ The box to be scrolled (moved) includes all columns and rows to be affected.
  33. ? "│ If Attr% => 0 then both attribute and characters will be moved else
  34. ? "│ If Attr% = -1 then only the characters will be moved
  35. ? "│ If Char? >  0 the vacated row or column will be filled with CHR$(Char?)
  36. ? "│ If Char? =  0 the vacated row or column will be ignored completely
  37. ? "└─────────────────────────────────────────────────────────────────────────
  38.  
  39. Char? = 219                                  ' REM this line then run again
  40. FOR A? = 1 TO 15                             ' all of this just creates
  41.   T$ = T$ + CHR$(17,A?,A?+64)                ' and copies the text boxes
  42. NEXT
  43. T$ = T$ + T$
  44. TBoxDRAW 15, 11, 9, 17, 1, 15
  45. P% = 1
  46. FOR R? = 16 TO 22
  47.   TprintMID R?, 12, T$, P%, 45, 0
  48.   INCR P%, 3
  49. NEXT
  50. S$ = fTBoxREAD$( 15, 11, 9, 17, 1 )
  51. FOR X% = 31 TO 51 STEP 20
  52.   MID$( S$, 1, 1 ) = CHR$(X%) : TBoxWRITE S$
  53. NEXT
  54. Tprint 14, 12, "WITH ATTRIBUTES", 15
  55. Tprint 14, 34, "CONTROL BOX"    , 14
  56. Tprint 14, 52, "W/OUT ATTRIBUTE", 15
  57. Tprint 25, 13, "PRESS îANY KEY  4 TIMES FOR <UP> <DOWN> <LEFT> <RIGHT>", 11
  58.                                              '┌──────────────────────────────
  59. fANYkey                                      '│ SCROLL UP    notice that each
  60. Tprint 16,  1, " UP ", 15                    '│
  61. TBoxUP 16, 12, 7, 15, Char?,  7              '│              call uses the
  62. TBoxUP 16, 52, 7, 15, Char?, -1              '│              same parameters
  63.                                              '│              for the boxes
  64. fANYkey                                      '│ SCROLL DOWN
  65. Tprint 16, 1, "DOWN", 15                     '│
  66. TBoxDOWN 16, 12, 7, 15, Char?,  7            '│
  67. TBoxDOWN 16, 52, 7, 15, Char?, -1            '│
  68.                                              '│
  69. fANYkey                                      '│ SCROLL LEFT
  70. Tprint 16, 1, "LEFT", 15                     '│
  71. TBoxLEFT 16, 12, 7, 15, Char?,  7            '│
  72. TBoxLEFT 16, 52, 7, 15, Char?, -1            '│
  73.                                              '│
  74. fANYkey                                      '│
  75. Tprint 16, 1, "RIGHT", 15                    '│
  76. TBoxRIGHT 16, 12, 7, 15, Char?,  7           '│ SCROLL RIGHT
  77. TBoxRIGHT 16, 52, 7, 15, Char?, -1           '│
  78.                                              '│
  79.                                              '│
  80. TBoxFILL 25, 1, 1, 80, 32, 7                 '│ CHANGE MESSGE LINE 25
  81. Tprint 25, 36, "Thank you!", 13              '│
  82. fANYkey                                      '│
  83. FOR X% = 1 TO 80                             '│ "Exit, stage left!"
  84.   TBoxRIGHT 1, 1, 25, 80, 32, 7              '│            Snagglepuss
  85. NEXT                                         '└─────────────────────────────
  86.